
/**
 * 使用方法：
 *      AlertMgr.showAlert("你要说的话", () => {});
 */
import * as cc from 'cc';
import DialogMgr from "../../lib/dialog/DialogMgr";
import AlertView from "./AlertView";

/**
 * 对话框 逻辑
 * @description 交流群：415468592
 */
export default class AlertMgr {
    /**
    * @param content
    * @param sure_fun
    * @param close_fun
    */
    public static showAlert(content: string, sure_fun?: Function, close_fun?: Function | any) {
        DialogMgr.showDialog("AlertView", content, (node_dialog: cc.Node) => {
            let comp_alertView = node_dialog.getComponent(AlertView);
            comp_alertView.initCall(sure_fun, close_fun)
        });
    }
}